//#########################################################################
//                              WackiEngie
//           Copyright (c) 2014 Marc Wacker. All rights reserved.
//#########################################################################

#pragma once

#include "WeCorePrerequisites.h"
#include "WeMatrix4.h"

namespace WackiEngine
{
	
	class GLState
	{
	public:
		static void setModelView(const Matrix4f &mat) { _modelView = mat; }
		static void setProjection(const Matrix4f &mat) { _projection = mat; }
		static Matrix4f& modelView() { return _modelView; }
		static Matrix4f& projection() { return _projection; }

		static void multiplyModelViewMatrix(const Matrix4f &mat);
		static void multiplyProjectionMatrix(const Matrix4f &mat);

		static void pushModelViewMatrix();
		static void popModelViewMatrix();
		static void pushProjectionMatrix();
		static void popProjectionMatrix();


	private:
		static Vector<Matrix4f> _modelViewStack;
		static Vector<Matrix4f> _projectionStack;

		static Matrix4f	_view;
		static Matrix4f	_projection;
		static Matrix4f	_modelView;
	};
	
}